/*
    SUSAN® - Sole of Unix Save ANything

   Copyright (C) 2016-2019 Skyatlas co. ltd

   
*/

#ifndef BAREOS_DIRD_UA_PRUNE_H_
#define BAREOS_DIRD_UA_PRUNE_H_

#include "dird/ua.h"

namespace directordaemon {

struct del_ctx;

bool PruneFiles(UaContext* ua, ClientResource* client, PoolResource* pool);
bool PruneJobs(UaContext* ua,
               ClientResource* client,
               PoolResource* pool,
               int JobType);
bool PruneVolume(UaContext* ua, MediaDbRecord* mr);
int JobDeleteHandler(void* ctx, int num_fields, char** row);
int DelCountHandler(void* ctx, int num_fields, char** row);
int FileDeleteHandler(void* ctx, int num_fields, char** row);
int GetPruneListForVolume(UaContext* ua, MediaDbRecord* mr, del_ctx* del);
int ExcludeRunningJobsFromList(del_ctx* prune_list);

} /* namespace directordaemon */
#endif  // BAREOS_DIRD_UA_PRUNE_H_
